@datapos/datapos-development 0.3.409 → 0.3.411
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datapos-development.es.js +197 -196
- package/dist/datapos-development.es.js.map +1 -1
- package/dist/types/src/utilities/index.d.ts +1 -1
- package/package.json +5 -2
- package/tsconfig.json +27 -0
- package/vite.config.ts +52 -0
- package/vitest.config.ts +21 -0
|
@@ -48,7 +48,7 @@ function Pe(t, e) {
|
|
|
48
48
|
function ft(t, e) {
|
|
49
49
|
return t < 65 ? t === 36 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && ls.test(String.fromCharCode(t)) : e === !1 ? !1 : Pe(t, ai);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function gt(t, e) {
|
|
52
52
|
return t < 48 ? t === 36 : t < 58 ? !0 : t < 65 ? !1 : t < 91 ? !0 : t < 97 ? t === 95 : t < 123 ? !0 : t <= 65535 ? t >= 170 && fs.test(String.fromCharCode(t)) : e === !1 ? !1 : Pe(t, ai) || Pe(t, hs);
|
|
53
53
|
}
|
|
54
54
|
var O = function(e, s) {
|
|
@@ -175,7 +175,7 @@ var Ie = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/, W = /(?:\s|\/\/.*|\/\*
|
|
|
175
175
|
function kt(t) {
|
|
176
176
|
return Ge[t] || (Ge[t] = new RegExp("^(?:" + t.replace(/ /g, "|") + ")$"));
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function bt(t) {
|
|
179
179
|
return t <= 65535 ? String.fromCharCode(t) : (t -= 65536, String.fromCharCode((t >> 10) + 55296, (t & 1023) + 56320));
|
|
180
180
|
}
|
|
181
181
|
var ys = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/, Rt = function(e, s) {
|
|
@@ -320,28 +320,28 @@ var $t = 1, Dt = 2, Ne = 4, ci = 8, Le = 16, pi = 32, he = 64, li = 128, _t = 25
|
|
|
320
320
|
function Oe(t, e) {
|
|
321
321
|
return Dt | (t ? Ne : 0) | (e ? ci : 0);
|
|
322
322
|
}
|
|
323
|
-
var ie = 0, Re = 1,
|
|
323
|
+
var ie = 0, Re = 1, St = 2, fi = 3, di = 4, mi = 5, H = function(e, s, a) {
|
|
324
324
|
this.options = e = xs(e), this.sourceFile = e.sourceFile, this.keywords = kt(cs[e.ecmaVersion >= 6 ? 6 : e.sourceType === "module" ? "5module" : 5]);
|
|
325
325
|
var o = "";
|
|
326
326
|
e.allowReserved !== !0 && (o = ve[e.ecmaVersion >= 6 ? 6 : e.ecmaVersion === 5 ? 5 : 3], e.sourceType === "module" && (o += " await")), this.reservedWords = kt(o);
|
|
327
327
|
var l = (o ? o + " " : "") + ve.strict;
|
|
328
328
|
this.reservedWordsStrict = kt(l), this.reservedWordsStrictBind = kt(l + " " + ve.strictBind), this.input = String(s), this.containsEsc = !1, a ? (this.pos = a, this.lineStart = this.input.lastIndexOf(`
|
|
329
329
|
`, a - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(J).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = u.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = e.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && e.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope($t), this.regexpState = null, this.privateNameStack = [];
|
|
330
|
-
},
|
|
330
|
+
}, yt = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
|
|
331
331
|
H.prototype.parse = function() {
|
|
332
332
|
var e = this.options.program || this.startNode();
|
|
333
333
|
return this.nextToken(), this.parseTopLevel(e);
|
|
334
334
|
};
|
|
335
|
-
|
|
335
|
+
yt.inFunction.get = function() {
|
|
336
336
|
return (this.currentVarScope().flags & Dt) > 0;
|
|
337
337
|
};
|
|
338
|
-
|
|
338
|
+
yt.inGenerator.get = function() {
|
|
339
339
|
return (this.currentVarScope().flags & ci) > 0;
|
|
340
340
|
};
|
|
341
|
-
|
|
341
|
+
yt.inAsync.get = function() {
|
|
342
342
|
return (this.currentVarScope().flags & Ne) > 0;
|
|
343
343
|
};
|
|
344
|
-
|
|
344
|
+
yt.canAwait.get = function() {
|
|
345
345
|
for (var t = this.scopeStack.length - 1; t >= 0; t--) {
|
|
346
346
|
var e = this.scopeStack[t], s = e.flags;
|
|
347
347
|
if (s & (_t | Wt))
|
|
@@ -351,17 +351,17 @@ mt.canAwait.get = function() {
|
|
|
351
351
|
}
|
|
352
352
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
353
353
|
};
|
|
354
|
-
|
|
354
|
+
yt.allowSuper.get = function() {
|
|
355
355
|
var t = this.currentThisScope(), e = t.flags;
|
|
356
356
|
return (e & he) > 0 || this.options.allowSuperOutsideMethod;
|
|
357
357
|
};
|
|
358
|
-
|
|
358
|
+
yt.allowDirectSuper.get = function() {
|
|
359
359
|
return (this.currentThisScope().flags & li) > 0;
|
|
360
360
|
};
|
|
361
|
-
|
|
361
|
+
yt.treatFunctionsAsVar.get = function() {
|
|
362
362
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
363
363
|
};
|
|
364
|
-
|
|
364
|
+
yt.allowNewDotTarget.get = function() {
|
|
365
365
|
for (var t = this.scopeStack.length - 1; t >= 0; t--) {
|
|
366
366
|
var e = this.scopeStack[t], s = e.flags;
|
|
367
367
|
if (s & (_t | Wt) || s & Dt && !(s & Le))
|
|
@@ -369,7 +369,7 @@ mt.allowNewDotTarget.get = function() {
|
|
|
369
369
|
}
|
|
370
370
|
return !1;
|
|
371
371
|
};
|
|
372
|
-
|
|
372
|
+
yt.inClassStaticBlock.get = function() {
|
|
373
373
|
return (this.currentVarScope().flags & _t) > 0;
|
|
374
374
|
};
|
|
375
375
|
H.extend = function() {
|
|
@@ -388,7 +388,7 @@ H.parseExpressionAt = function(e, s, a) {
|
|
|
388
388
|
H.tokenizer = function(e, s) {
|
|
389
389
|
return new this(s, e);
|
|
390
390
|
};
|
|
391
|
-
Object.defineProperties(H.prototype,
|
|
391
|
+
Object.defineProperties(H.prototype, yt);
|
|
392
392
|
var Y = H.prototype, gs = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
393
393
|
Y.strictDirective = function(t) {
|
|
394
394
|
if (this.options.ecmaVersion < 5)
|
|
@@ -462,8 +462,8 @@ Y.checkYieldAwaitInDefaultParams = function() {
|
|
|
462
462
|
Y.isSimpleAssignTarget = function(t) {
|
|
463
463
|
return t.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(t.expression) : t.type === "Identifier" || t.type === "MemberExpression";
|
|
464
464
|
};
|
|
465
|
-
var
|
|
466
|
-
|
|
465
|
+
var k = H.prototype;
|
|
466
|
+
k.parseTopLevel = function(t) {
|
|
467
467
|
var e = /* @__PURE__ */ Object.create(null);
|
|
468
468
|
for (t.body || (t.body = []); this.type !== u.eof; ) {
|
|
469
469
|
var s = this.parseStatement(null, !0, e);
|
|
@@ -477,7 +477,7 @@ w.parseTopLevel = function(t) {
|
|
|
477
477
|
return this.adaptDirectivePrologue(t.body), this.next(), t.sourceType = this.options.sourceType, this.finishNode(t, "Program");
|
|
478
478
|
};
|
|
479
479
|
var Me = { kind: "loop" }, bs = { kind: "switch" };
|
|
480
|
-
|
|
480
|
+
k.isLet = function(t) {
|
|
481
481
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
482
482
|
return !1;
|
|
483
483
|
W.lastIndex = this.pos;
|
|
@@ -489,7 +489,7 @@ w.isLet = function(t) {
|
|
|
489
489
|
if (a === 123 || a > 55295 && a < 56320)
|
|
490
490
|
return !0;
|
|
491
491
|
if (ft(a, !0)) {
|
|
492
|
-
for (var o = s + 1;
|
|
492
|
+
for (var o = s + 1; gt(a = this.input.charCodeAt(o), !0); )
|
|
493
493
|
++o;
|
|
494
494
|
if (a === 92 || a > 55295 && a < 56320)
|
|
495
495
|
return !0;
|
|
@@ -499,14 +499,14 @@ w.isLet = function(t) {
|
|
|
499
499
|
}
|
|
500
500
|
return !1;
|
|
501
501
|
};
|
|
502
|
-
|
|
502
|
+
k.isAsyncFunction = function() {
|
|
503
503
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
|
|
504
504
|
return !1;
|
|
505
505
|
W.lastIndex = this.pos;
|
|
506
506
|
var t = W.exec(this.input), e = this.pos + t[0].length, s;
|
|
507
|
-
return !J.test(this.input.slice(this.pos, e)) && this.input.slice(e, e + 8) === "function" && (e + 8 === this.input.length || !(
|
|
507
|
+
return !J.test(this.input.slice(this.pos, e)) && this.input.slice(e, e + 8) === "function" && (e + 8 === this.input.length || !(gt(s = this.input.charCodeAt(e + 8)) || s > 55295 && s < 56320));
|
|
508
508
|
};
|
|
509
|
-
|
|
509
|
+
k.isUsingKeyword = function(t, e) {
|
|
510
510
|
if (this.options.ecmaVersion < 17 || !this.isContextual(t ? "await" : "using"))
|
|
511
511
|
return !1;
|
|
512
512
|
W.lastIndex = this.pos;
|
|
@@ -515,7 +515,7 @@ w.isUsingKeyword = function(t, e) {
|
|
|
515
515
|
return !1;
|
|
516
516
|
if (t) {
|
|
517
517
|
var o = a + 5, l;
|
|
518
|
-
if (this.input.slice(a, o) !== "using" || o === this.input.length ||
|
|
518
|
+
if (this.input.slice(a, o) !== "using" || o === this.input.length || gt(l = this.input.charCodeAt(o)) || l > 55295 && l < 56320)
|
|
519
519
|
return !1;
|
|
520
520
|
W.lastIndex = o;
|
|
521
521
|
var d = W.exec(this.input);
|
|
@@ -524,19 +524,19 @@ w.isUsingKeyword = function(t, e) {
|
|
|
524
524
|
}
|
|
525
525
|
if (e) {
|
|
526
526
|
var v = a + 2, g;
|
|
527
|
-
if (this.input.slice(a, v) === "of" && (v === this.input.length || !
|
|
527
|
+
if (this.input.slice(a, v) === "of" && (v === this.input.length || !gt(g = this.input.charCodeAt(v)) && !(g > 55295 && g < 56320)))
|
|
528
528
|
return !1;
|
|
529
529
|
}
|
|
530
530
|
var h = this.input.charCodeAt(a);
|
|
531
531
|
return ft(h, !0) || h === 92;
|
|
532
532
|
};
|
|
533
|
-
|
|
533
|
+
k.isAwaitUsing = function(t) {
|
|
534
534
|
return this.isUsingKeyword(!0, t);
|
|
535
535
|
};
|
|
536
|
-
|
|
536
|
+
k.isUsing = function(t) {
|
|
537
537
|
return this.isUsingKeyword(!1, t);
|
|
538
538
|
};
|
|
539
|
-
|
|
539
|
+
k.parseStatement = function(t, e, s) {
|
|
540
540
|
var a = this.type, o = this.startNode(), l;
|
|
541
541
|
switch (this.isLet(t) && (a = u._var, l = "let"), a) {
|
|
542
542
|
case u._break:
|
|
@@ -597,7 +597,7 @@ w.parseStatement = function(t, e, s) {
|
|
|
597
597
|
return a === u.name && N.type === "Identifier" && this.eat(u.colon) ? this.parseLabeledStatement(o, P, N, t) : this.parseExpressionStatement(o, N);
|
|
598
598
|
}
|
|
599
599
|
};
|
|
600
|
-
|
|
600
|
+
k.parseBreakContinueStatement = function(t, e) {
|
|
601
601
|
var s = e === "break";
|
|
602
602
|
this.next(), this.eat(u.semi) || this.insertSemicolon() ? t.label = null : this.type !== u.name ? this.unexpected() : (t.label = this.parseIdent(), this.semicolon());
|
|
603
603
|
for (var a = 0; a < this.labels.length; ++a) {
|
|
@@ -607,13 +607,13 @@ w.parseBreakContinueStatement = function(t, e) {
|
|
|
607
607
|
}
|
|
608
608
|
return a === this.labels.length && this.raise(t.start, "Unsyntactic " + e), this.finishNode(t, s ? "BreakStatement" : "ContinueStatement");
|
|
609
609
|
};
|
|
610
|
-
|
|
610
|
+
k.parseDebuggerStatement = function(t) {
|
|
611
611
|
return this.next(), this.semicolon(), this.finishNode(t, "DebuggerStatement");
|
|
612
612
|
};
|
|
613
|
-
|
|
613
|
+
k.parseDoStatement = function(t) {
|
|
614
614
|
return this.next(), this.labels.push(Me), t.body = this.parseStatement("do"), this.labels.pop(), this.expect(u._while), t.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(u.semi) : this.semicolon(), this.finishNode(t, "DoWhileStatement");
|
|
615
615
|
};
|
|
616
|
-
|
|
616
|
+
k.parseForStatement = function(t) {
|
|
617
617
|
this.next();
|
|
618
618
|
var e = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
619
619
|
if (this.labels.push(Me), this.enterScope(0), this.expect(u.parenL), this.type === u.semi)
|
|
@@ -631,19 +631,19 @@ w.parseForStatement = function(t) {
|
|
|
631
631
|
var h = this.containsEsc, P = new ce(), N = this.start, j = e > -1 ? this.parseExprSubscripts(P, "await") : this.parseExpression(!0, P);
|
|
632
632
|
return this.type === u._in || (d = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (e > -1 ? (this.type === u._in && this.unexpected(e), t.await = !0) : d && this.options.ecmaVersion >= 8 && (j.start === N && !h && j.type === "Identifier" && j.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (t.await = !1)), l && d && this.raise(j.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(j, !1, P), this.checkLValPattern(j), this.parseForIn(t, j)) : (this.checkExpressionErrors(P, !0), e > -1 && this.unexpected(e), this.parseFor(t, j));
|
|
633
633
|
};
|
|
634
|
-
|
|
634
|
+
k.parseForAfterInit = function(t, e, s) {
|
|
635
635
|
return (this.type === u._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && e.declarations.length === 1 ? (this.options.ecmaVersion >= 9 && (this.type === u._in ? s > -1 && this.unexpected(s) : t.await = s > -1), this.parseForIn(t, e)) : (s > -1 && this.unexpected(s), this.parseFor(t, e));
|
|
636
636
|
};
|
|
637
|
-
|
|
637
|
+
k.parseFunctionStatement = function(t, e, s) {
|
|
638
638
|
return this.next(), this.parseFunction(t, qt | (s ? 0 : Ce), !1, e);
|
|
639
639
|
};
|
|
640
|
-
|
|
640
|
+
k.parseIfStatement = function(t) {
|
|
641
641
|
return this.next(), t.test = this.parseParenExpression(), t.consequent = this.parseStatement("if"), t.alternate = this.eat(u._else) ? this.parseStatement("if") : null, this.finishNode(t, "IfStatement");
|
|
642
642
|
};
|
|
643
|
-
|
|
643
|
+
k.parseReturnStatement = function(t) {
|
|
644
644
|
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(u.semi) || this.insertSemicolon() ? t.argument = null : (t.argument = this.parseExpression(), this.semicolon()), this.finishNode(t, "ReturnStatement");
|
|
645
645
|
};
|
|
646
|
-
|
|
646
|
+
k.parseSwitchStatement = function(t) {
|
|
647
647
|
this.next(), t.discriminant = this.parseParenExpression(), t.cases = [], this.expect(u.braceL), this.labels.push(bs), this.enterScope(0);
|
|
648
648
|
for (var e, s = !1; this.type !== u.braceR; )
|
|
649
649
|
if (this.type === u._case || this.type === u._default) {
|
|
@@ -653,34 +653,34 @@ w.parseSwitchStatement = function(t) {
|
|
|
653
653
|
e || this.unexpected(), e.consequent.push(this.parseStatement(null));
|
|
654
654
|
return this.exitScope(), e && this.finishNode(e, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(t, "SwitchStatement");
|
|
655
655
|
};
|
|
656
|
-
|
|
656
|
+
k.parseThrowStatement = function(t) {
|
|
657
657
|
return this.next(), J.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), t.argument = this.parseExpression(), this.semicolon(), this.finishNode(t, "ThrowStatement");
|
|
658
658
|
};
|
|
659
659
|
var Ts = [];
|
|
660
|
-
|
|
660
|
+
k.parseCatchClauseParam = function() {
|
|
661
661
|
var t = this.parseBindingAtom(), e = t.type === "Identifier";
|
|
662
|
-
return this.enterScope(e ? pi : 0), this.checkLValPattern(t, e ? di :
|
|
662
|
+
return this.enterScope(e ? pi : 0), this.checkLValPattern(t, e ? di : St), this.expect(u.parenR), t;
|
|
663
663
|
};
|
|
664
|
-
|
|
664
|
+
k.parseTryStatement = function(t) {
|
|
665
665
|
if (this.next(), t.block = this.parseBlock(), t.handler = null, this.type === u._catch) {
|
|
666
666
|
var e = this.startNode();
|
|
667
667
|
this.next(), this.eat(u.parenL) ? e.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), e.param = null, this.enterScope(0)), e.body = this.parseBlock(!1), this.exitScope(), t.handler = this.finishNode(e, "CatchClause");
|
|
668
668
|
}
|
|
669
669
|
return t.finalizer = this.eat(u._finally) ? this.parseBlock() : null, !t.handler && !t.finalizer && this.raise(t.start, "Missing catch or finally clause"), this.finishNode(t, "TryStatement");
|
|
670
670
|
};
|
|
671
|
-
|
|
671
|
+
k.parseVarStatement = function(t, e, s) {
|
|
672
672
|
return this.next(), this.parseVar(t, !1, e, s), this.semicolon(), this.finishNode(t, "VariableDeclaration");
|
|
673
673
|
};
|
|
674
|
-
|
|
674
|
+
k.parseWhileStatement = function(t) {
|
|
675
675
|
return this.next(), t.test = this.parseParenExpression(), this.labels.push(Me), t.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(t, "WhileStatement");
|
|
676
676
|
};
|
|
677
|
-
|
|
677
|
+
k.parseWithStatement = function(t) {
|
|
678
678
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), t.object = this.parseParenExpression(), t.body = this.parseStatement("with"), this.finishNode(t, "WithStatement");
|
|
679
679
|
};
|
|
680
|
-
|
|
680
|
+
k.parseEmptyStatement = function(t) {
|
|
681
681
|
return this.next(), this.finishNode(t, "EmptyStatement");
|
|
682
682
|
};
|
|
683
|
-
|
|
683
|
+
k.parseLabeledStatement = function(t, e, s, a) {
|
|
684
684
|
for (var o = 0, l = this.labels; o < l.length; o += 1) {
|
|
685
685
|
var d = l[o];
|
|
686
686
|
d.name === e && this.raise(s.start, "Label '" + e + "' is already declared");
|
|
@@ -694,27 +694,27 @@ w.parseLabeledStatement = function(t, e, s, a) {
|
|
|
694
694
|
}
|
|
695
695
|
return this.labels.push({ name: e, kind: v, statementStart: this.start }), t.body = this.parseStatement(a ? a.indexOf("label") === -1 ? a + "label" : a : "label"), this.labels.pop(), t.label = s, this.finishNode(t, "LabeledStatement");
|
|
696
696
|
};
|
|
697
|
-
|
|
697
|
+
k.parseExpressionStatement = function(t, e) {
|
|
698
698
|
return t.expression = e, this.semicolon(), this.finishNode(t, "ExpressionStatement");
|
|
699
699
|
};
|
|
700
|
-
|
|
700
|
+
k.parseBlock = function(t, e, s) {
|
|
701
701
|
for (t === void 0 && (t = !0), e === void 0 && (e = this.startNode()), e.body = [], this.expect(u.braceL), t && this.enterScope(0); this.type !== u.braceR; ) {
|
|
702
702
|
var a = this.parseStatement(null);
|
|
703
703
|
e.body.push(a);
|
|
704
704
|
}
|
|
705
705
|
return s && (this.strict = !1), this.next(), t && this.exitScope(), this.finishNode(e, "BlockStatement");
|
|
706
706
|
};
|
|
707
|
-
|
|
707
|
+
k.parseFor = function(t, e) {
|
|
708
708
|
return t.init = e, this.expect(u.semi), t.test = this.type === u.semi ? null : this.parseExpression(), this.expect(u.semi), t.update = this.type === u.parenR ? null : this.parseExpression(), this.expect(u.parenR), t.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(t, "ForStatement");
|
|
709
709
|
};
|
|
710
|
-
|
|
710
|
+
k.parseForIn = function(t, e) {
|
|
711
711
|
var s = this.type === u._in;
|
|
712
712
|
return this.next(), e.type === "VariableDeclaration" && e.declarations[0].init != null && (!s || this.options.ecmaVersion < 8 || this.strict || e.kind !== "var" || e.declarations[0].id.type !== "Identifier") && this.raise(
|
|
713
713
|
e.start,
|
|
714
714
|
(s ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"
|
|
715
715
|
), t.left = e, t.right = s ? this.parseExpression() : this.parseMaybeAssign(), this.expect(u.parenR), t.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(t, s ? "ForInStatement" : "ForOfStatement");
|
|
716
716
|
};
|
|
717
|
-
|
|
717
|
+
k.parseVar = function(t, e, s, a) {
|
|
718
718
|
for (t.declarations = [], t.kind = s; ; ) {
|
|
719
719
|
var o = this.startNode();
|
|
720
720
|
if (this.parseVarId(o, s), this.eat(u.eq) ? o.init = this.parseMaybeAssign(e) : !a && s === "const" && !(this.type === u._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) ? this.unexpected() : !a && (s === "using" || s === "await using") && this.options.ecmaVersion >= 17 && this.type !== u._in && !this.isContextual("of") ? this.raise(this.lastTokEnd, "Missing initializer in " + s + " declaration") : !a && o.id.type !== "Identifier" && !(e && (this.type === u._in || this.isContextual("of"))) ? this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : o.init = null, t.declarations.push(this.finishNode(o, "VariableDeclarator")), !this.eat(u.comma))
|
|
@@ -722,19 +722,19 @@ w.parseVar = function(t, e, s, a) {
|
|
|
722
722
|
}
|
|
723
723
|
return t;
|
|
724
724
|
};
|
|
725
|
-
|
|
726
|
-
t.id = e === "using" || e === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(t.id, e === "var" ? Re :
|
|
725
|
+
k.parseVarId = function(t, e) {
|
|
726
|
+
t.id = e === "using" || e === "await using" ? this.parseIdent() : this.parseBindingAtom(), this.checkLValPattern(t.id, e === "var" ? Re : St, !1);
|
|
727
727
|
};
|
|
728
728
|
var qt = 1, Ce = 2, yi = 4;
|
|
729
|
-
|
|
730
|
-
this.initFunction(t), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !a) && (this.type === u.star && e & Ce && this.unexpected(), t.generator = this.eat(u.star)), this.options.ecmaVersion >= 8 && (t.async = !!a), e & qt && (t.id = e & yi && this.type !== u.name ? null : this.parseIdent(), t.id && !(e & Ce) && this.checkLValSimple(t.id, this.strict || t.generator || t.async ? this.treatFunctionsAsVar ? Re :
|
|
729
|
+
k.parseFunction = function(t, e, s, a, o) {
|
|
730
|
+
this.initFunction(t), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !a) && (this.type === u.star && e & Ce && this.unexpected(), t.generator = this.eat(u.star)), this.options.ecmaVersion >= 8 && (t.async = !!a), e & qt && (t.id = e & yi && this.type !== u.name ? null : this.parseIdent(), t.id && !(e & Ce) && this.checkLValSimple(t.id, this.strict || t.generator || t.async ? this.treatFunctionsAsVar ? Re : St : fi));
|
|
731
731
|
var l = this.yieldPos, d = this.awaitPos, v = this.awaitIdentPos;
|
|
732
732
|
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Oe(t.async, t.generator)), e & qt || (t.id = this.type === u.name ? this.parseIdent() : null), this.parseFunctionParams(t), this.parseFunctionBody(t, s, !1, o), this.yieldPos = l, this.awaitPos = d, this.awaitIdentPos = v, this.finishNode(t, e & qt ? "FunctionDeclaration" : "FunctionExpression");
|
|
733
733
|
};
|
|
734
|
-
|
|
734
|
+
k.parseFunctionParams = function(t) {
|
|
735
735
|
this.expect(u.parenL), t.params = this.parseBindingList(u.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
736
736
|
};
|
|
737
|
-
|
|
737
|
+
k.parseClass = function(t, e) {
|
|
738
738
|
this.next();
|
|
739
739
|
var s = this.strict;
|
|
740
740
|
this.strict = !0, this.parseClassId(t, e), this.parseClassSuper(t);
|
|
@@ -745,7 +745,7 @@ w.parseClass = function(t, e) {
|
|
|
745
745
|
}
|
|
746
746
|
return this.strict = s, this.next(), t.body = this.finishNode(o, "ClassBody"), this.exitClassBody(), this.finishNode(t, e ? "ClassDeclaration" : "ClassExpression");
|
|
747
747
|
};
|
|
748
|
-
|
|
748
|
+
k.parseClassElement = function(t) {
|
|
749
749
|
if (this.eat(u.semi))
|
|
750
750
|
return null;
|
|
751
751
|
var e = this.options.ecmaVersion, s = this.startNode(), a = "", o = !1, l = !1, d = "method", v = !1;
|
|
@@ -765,22 +765,22 @@ w.parseClassElement = function(t) {
|
|
|
765
765
|
this.parseClassField(s);
|
|
766
766
|
return s;
|
|
767
767
|
};
|
|
768
|
-
|
|
768
|
+
k.isClassElementNameStart = function() {
|
|
769
769
|
return this.type === u.name || this.type === u.privateId || this.type === u.num || this.type === u.string || this.type === u.bracketL || this.type.keyword;
|
|
770
770
|
};
|
|
771
|
-
|
|
771
|
+
k.parseClassElementName = function(t) {
|
|
772
772
|
this.type === u.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), t.computed = !1, t.key = this.parsePrivateIdent()) : this.parsePropertyName(t);
|
|
773
773
|
};
|
|
774
|
-
|
|
774
|
+
k.parseClassMethod = function(t, e, s, a) {
|
|
775
775
|
var o = t.key;
|
|
776
776
|
t.kind === "constructor" ? (e && this.raise(o.start, "Constructor can't be a generator"), s && this.raise(o.start, "Constructor can't be an async method")) : t.static && se(t, "prototype") && this.raise(o.start, "Classes may not have a static property named prototype");
|
|
777
777
|
var l = t.value = this.parseMethod(e, s, a);
|
|
778
778
|
return t.kind === "get" && l.params.length !== 0 && this.raiseRecoverable(l.start, "getter should have no params"), t.kind === "set" && l.params.length !== 1 && this.raiseRecoverable(l.start, "setter should have exactly one param"), t.kind === "set" && l.params[0].type === "RestElement" && this.raiseRecoverable(l.params[0].start, "Setter cannot use rest params"), this.finishNode(t, "MethodDefinition");
|
|
779
779
|
};
|
|
780
|
-
|
|
780
|
+
k.parseClassField = function(t) {
|
|
781
781
|
return se(t, "constructor") ? this.raise(t.key.start, "Classes can't have a field named 'constructor'") : t.static && se(t, "prototype") && this.raise(t.key.start, "Classes can't have a static field named 'prototype'"), this.eat(u.eq) ? (this.enterScope(Wt | he), t.value = this.parseMaybeAssign(), this.exitScope()) : t.value = null, this.semicolon(), this.finishNode(t, "PropertyDefinition");
|
|
782
782
|
};
|
|
783
|
-
|
|
783
|
+
k.parseClassStaticBlock = function(t) {
|
|
784
784
|
t.body = [];
|
|
785
785
|
var e = this.labels;
|
|
786
786
|
for (this.labels = [], this.enterScope(_t | he); this.type !== u.braceR; ) {
|
|
@@ -789,17 +789,17 @@ w.parseClassStaticBlock = function(t) {
|
|
|
789
789
|
}
|
|
790
790
|
return this.next(), this.exitScope(), this.labels = e, this.finishNode(t, "StaticBlock");
|
|
791
791
|
};
|
|
792
|
-
|
|
793
|
-
this.type === u.name ? (t.id = this.parseIdent(), e && this.checkLValSimple(t.id,
|
|
792
|
+
k.parseClassId = function(t, e) {
|
|
793
|
+
this.type === u.name ? (t.id = this.parseIdent(), e && this.checkLValSimple(t.id, St, !1)) : (e === !0 && this.unexpected(), t.id = null);
|
|
794
794
|
};
|
|
795
|
-
|
|
795
|
+
k.parseClassSuper = function(t) {
|
|
796
796
|
t.superClass = this.eat(u._extends) ? this.parseExprSubscripts(null, !1) : null;
|
|
797
797
|
};
|
|
798
|
-
|
|
798
|
+
k.enterClassBody = function() {
|
|
799
799
|
var t = { declared: /* @__PURE__ */ Object.create(null), used: [] };
|
|
800
800
|
return this.privateNameStack.push(t), t.declared;
|
|
801
801
|
};
|
|
802
|
-
|
|
802
|
+
k.exitClassBody = function() {
|
|
803
803
|
var t = this.privateNameStack.pop(), e = t.declared, s = t.used;
|
|
804
804
|
if (this.options.checkPrivateFields)
|
|
805
805
|
for (var a = this.privateNameStack.length, o = a === 0 ? null : this.privateNameStack[a - 1], l = 0; l < s.length; ++l) {
|
|
@@ -815,10 +815,10 @@ function se(t, e) {
|
|
|
815
815
|
var s = t.computed, a = t.key;
|
|
816
816
|
return !s && (a.type === "Identifier" && a.name === e || a.type === "Literal" && a.value === e);
|
|
817
817
|
}
|
|
818
|
-
|
|
818
|
+
k.parseExportAllDeclaration = function(t, e) {
|
|
819
819
|
return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (t.exported = this.parseModuleExportName(), this.checkExport(e, t.exported, this.lastTokStart)) : t.exported = null), this.expectContextual("from"), this.type !== u.string && this.unexpected(), t.source = this.parseExprAtom(), this.options.ecmaVersion >= 16 && (t.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(t, "ExportAllDeclaration");
|
|
820
820
|
};
|
|
821
|
-
|
|
821
|
+
k.parseExport = function(t, e) {
|
|
822
822
|
if (this.next(), this.eat(u.star))
|
|
823
823
|
return this.parseExportAllDeclaration(t, e);
|
|
824
824
|
if (this.eat(u._default))
|
|
@@ -839,10 +839,10 @@ w.parseExport = function(t, e) {
|
|
|
839
839
|
}
|
|
840
840
|
return this.finishNode(t, "ExportNamedDeclaration");
|
|
841
841
|
};
|
|
842
|
-
|
|
842
|
+
k.parseExportDeclaration = function(t) {
|
|
843
843
|
return this.parseStatement(null);
|
|
844
844
|
};
|
|
845
|
-
|
|
845
|
+
k.parseExportDefaultDeclaration = function() {
|
|
846
846
|
var t;
|
|
847
847
|
if (this.type === u._function || (t = this.isAsyncFunction())) {
|
|
848
848
|
var e = this.startNode();
|
|
@@ -855,10 +855,10 @@ w.parseExportDefaultDeclaration = function() {
|
|
|
855
855
|
return this.semicolon(), a;
|
|
856
856
|
}
|
|
857
857
|
};
|
|
858
|
-
|
|
858
|
+
k.checkExport = function(t, e, s) {
|
|
859
859
|
t && (typeof e != "string" && (e = e.type === "Identifier" ? e.name : e.value), Mt(t, e) && this.raiseRecoverable(s, "Duplicate export '" + e + "'"), t[e] = !0);
|
|
860
860
|
};
|
|
861
|
-
|
|
861
|
+
k.checkPatternExport = function(t, e) {
|
|
862
862
|
var s = e.type;
|
|
863
863
|
if (s === "Identifier")
|
|
864
864
|
this.checkExport(t, e, e.start);
|
|
@@ -874,17 +874,17 @@ w.checkPatternExport = function(t, e) {
|
|
|
874
874
|
}
|
|
875
875
|
else s === "Property" ? this.checkPatternExport(t, e.value) : s === "AssignmentPattern" ? this.checkPatternExport(t, e.left) : s === "RestElement" && this.checkPatternExport(t, e.argument);
|
|
876
876
|
};
|
|
877
|
-
|
|
877
|
+
k.checkVariableExport = function(t, e) {
|
|
878
878
|
if (t)
|
|
879
879
|
for (var s = 0, a = e; s < a.length; s += 1) {
|
|
880
880
|
var o = a[s];
|
|
881
881
|
this.checkPatternExport(t, o.id);
|
|
882
882
|
}
|
|
883
883
|
};
|
|
884
|
-
|
|
884
|
+
k.shouldParseExportStatement = function() {
|
|
885
885
|
return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
|
|
886
886
|
};
|
|
887
|
-
|
|
887
|
+
k.parseExportSpecifier = function(t) {
|
|
888
888
|
var e = this.startNode();
|
|
889
889
|
return e.local = this.parseModuleExportName(), e.exported = this.eatContextual("as") ? this.parseModuleExportName() : e.local, this.checkExport(
|
|
890
890
|
t,
|
|
@@ -892,7 +892,7 @@ w.parseExportSpecifier = function(t) {
|
|
|
892
892
|
e.exported.start
|
|
893
893
|
), this.finishNode(e, "ExportSpecifier");
|
|
894
894
|
};
|
|
895
|
-
|
|
895
|
+
k.parseExportSpecifiers = function(t) {
|
|
896
896
|
var e = [], s = !0;
|
|
897
897
|
for (this.expect(u.braceL); !this.eat(u.braceR); ) {
|
|
898
898
|
if (s)
|
|
@@ -903,22 +903,22 @@ w.parseExportSpecifiers = function(t) {
|
|
|
903
903
|
}
|
|
904
904
|
return e;
|
|
905
905
|
};
|
|
906
|
-
|
|
906
|
+
k.parseImport = function(t) {
|
|
907
907
|
return this.next(), this.type === u.string ? (t.specifiers = Ts, t.source = this.parseExprAtom()) : (t.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), t.source = this.type === u.string ? this.parseExprAtom() : this.unexpected()), this.options.ecmaVersion >= 16 && (t.attributes = this.parseWithClause()), this.semicolon(), this.finishNode(t, "ImportDeclaration");
|
|
908
908
|
};
|
|
909
|
-
|
|
909
|
+
k.parseImportSpecifier = function() {
|
|
910
910
|
var t = this.startNode();
|
|
911
|
-
return t.imported = this.parseModuleExportName(), this.eatContextual("as") ? t.local = this.parseIdent() : (this.checkUnreserved(t.imported), t.local = t.imported), this.checkLValSimple(t.local,
|
|
911
|
+
return t.imported = this.parseModuleExportName(), this.eatContextual("as") ? t.local = this.parseIdent() : (this.checkUnreserved(t.imported), t.local = t.imported), this.checkLValSimple(t.local, St), this.finishNode(t, "ImportSpecifier");
|
|
912
912
|
};
|
|
913
|
-
|
|
913
|
+
k.parseImportDefaultSpecifier = function() {
|
|
914
914
|
var t = this.startNode();
|
|
915
|
-
return t.local = this.parseIdent(), this.checkLValSimple(t.local,
|
|
915
|
+
return t.local = this.parseIdent(), this.checkLValSimple(t.local, St), this.finishNode(t, "ImportDefaultSpecifier");
|
|
916
916
|
};
|
|
917
|
-
|
|
917
|
+
k.parseImportNamespaceSpecifier = function() {
|
|
918
918
|
var t = this.startNode();
|
|
919
|
-
return this.next(), this.expectContextual("as"), t.local = this.parseIdent(), this.checkLValSimple(t.local,
|
|
919
|
+
return this.next(), this.expectContextual("as"), t.local = this.parseIdent(), this.checkLValSimple(t.local, St), this.finishNode(t, "ImportNamespaceSpecifier");
|
|
920
920
|
};
|
|
921
|
-
|
|
921
|
+
k.parseImportSpecifiers = function() {
|
|
922
922
|
var t = [], e = !0;
|
|
923
923
|
if (this.type === u.name && (t.push(this.parseImportDefaultSpecifier()), !this.eat(u.comma)))
|
|
924
924
|
return t;
|
|
@@ -933,7 +933,7 @@ w.parseImportSpecifiers = function() {
|
|
|
933
933
|
}
|
|
934
934
|
return t;
|
|
935
935
|
};
|
|
936
|
-
|
|
936
|
+
k.parseWithClause = function() {
|
|
937
937
|
var t = [];
|
|
938
938
|
if (!this.eat(u._with))
|
|
939
939
|
return t;
|
|
@@ -948,22 +948,22 @@ w.parseWithClause = function() {
|
|
|
948
948
|
}
|
|
949
949
|
return t;
|
|
950
950
|
};
|
|
951
|
-
|
|
951
|
+
k.parseImportAttribute = function() {
|
|
952
952
|
var t = this.startNode();
|
|
953
953
|
return t.key = this.type === u.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"), this.expect(u.colon), this.type !== u.string && this.unexpected(), t.value = this.parseExprAtom(), this.finishNode(t, "ImportAttribute");
|
|
954
954
|
};
|
|
955
|
-
|
|
955
|
+
k.parseModuleExportName = function() {
|
|
956
956
|
if (this.options.ecmaVersion >= 13 && this.type === u.string) {
|
|
957
957
|
var t = this.parseLiteral(this.value);
|
|
958
958
|
return ys.test(t.value) && this.raise(t.start, "An export name cannot include a lone surrogate."), t;
|
|
959
959
|
}
|
|
960
960
|
return this.parseIdent(!0);
|
|
961
961
|
};
|
|
962
|
-
|
|
962
|
+
k.adaptDirectivePrologue = function(t) {
|
|
963
963
|
for (var e = 0; e < t.length && this.isDirectiveCandidate(t[e]); ++e)
|
|
964
964
|
t[e].directive = t[e].expression.raw.slice(1, -1);
|
|
965
965
|
};
|
|
966
|
-
|
|
966
|
+
k.isDirectiveCandidate = function(t) {
|
|
967
967
|
return this.options.ecmaVersion >= 5 && t.type === "ExpressionStatement" && t.expression.type === "Literal" && typeof t.expression.value == "string" && // Reject parenthesized strings.
|
|
968
968
|
(this.input[t.start] === '"' || this.input[t.start] === "'");
|
|
969
969
|
};
|
|
@@ -1077,7 +1077,7 @@ pt.checkLValSimple = function(t, e, s) {
|
|
|
1077
1077
|
var a = e !== ie;
|
|
1078
1078
|
switch (t.type) {
|
|
1079
1079
|
case "Identifier":
|
|
1080
|
-
this.strict && this.reservedWordsStrictBind.test(t.name) && this.raiseRecoverable(t.start, (a ? "Binding " : "Assigning to ") + t.name + " in strict mode"), a && (e ===
|
|
1080
|
+
this.strict && this.reservedWordsStrictBind.test(t.name) && this.raiseRecoverable(t.start, (a ? "Binding " : "Assigning to ") + t.name + " in strict mode"), a && (e === St && t.name === "let" && this.raiseRecoverable(t.start, "let is disallowed as a lexically bound name"), s && (Mt(s, t.name) && this.raiseRecoverable(t.start, "Argument name clash"), s[t.name] = !0), e !== mi && this.declareName(t.name, e, t.start));
|
|
1081
1081
|
break;
|
|
1082
1082
|
case "ChainExpression":
|
|
1083
1083
|
this.raiseRecoverable(t.start, "Optional chaining cannot appear in left-hand side");
|
|
@@ -1303,7 +1303,7 @@ _.parseMaybeUnary = function(t, e, s, a) {
|
|
|
1303
1303
|
d = this.parseAwait(a), e = !0;
|
|
1304
1304
|
else if (this.type.prefix) {
|
|
1305
1305
|
var v = this.startNode(), g = this.type === u.incDec;
|
|
1306
|
-
v.operator = this.value, v.prefix = !0, this.next(), v.argument = this.parseMaybeUnary(null, !0, g, a), this.checkExpressionErrors(t, !0), g ? this.checkLValSimple(v.argument) : this.strict && v.operator === "delete" && xi(v.argument) ? this.raiseRecoverable(v.start, "Deleting local variable in strict mode") : v.operator === "delete" &&
|
|
1306
|
+
v.operator = this.value, v.prefix = !0, this.next(), v.argument = this.parseMaybeUnary(null, !0, g, a), this.checkExpressionErrors(t, !0), g ? this.checkLValSimple(v.argument) : this.strict && v.operator === "delete" && xi(v.argument) ? this.raiseRecoverable(v.start, "Deleting local variable in strict mode") : v.operator === "delete" && we(v.argument) ? this.raiseRecoverable(v.start, "Private fields can not be deleted") : e = !0, d = this.finishNode(v, g ? "UpdateExpression" : "UnaryExpression");
|
|
1307
1307
|
} else if (!e && this.type === u.privateId)
|
|
1308
1308
|
(a || this.privateNameStack.length === 0) && this.options.checkPrivateFields && this.unexpected(), d = this.parsePrivateIdent(), this.type !== u._in && this.unexpected();
|
|
1309
1309
|
else {
|
|
@@ -1325,8 +1325,8 @@ _.parseMaybeUnary = function(t, e, s, a) {
|
|
|
1325
1325
|
function xi(t) {
|
|
1326
1326
|
return t.type === "Identifier" || t.type === "ParenthesizedExpression" && xi(t.expression);
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1329
|
-
return t.type === "MemberExpression" && t.property.type === "PrivateIdentifier" || t.type === "ChainExpression" &&
|
|
1328
|
+
function we(t) {
|
|
1329
|
+
return t.type === "MemberExpression" && t.property.type === "PrivateIdentifier" || t.type === "ChainExpression" && we(t.expression) || t.type === "ParenthesizedExpression" && we(t.expression);
|
|
1330
1330
|
}
|
|
1331
1331
|
_.parseExprSubscripts = function(t, e) {
|
|
1332
1332
|
var s = this.start, a = this.startLoc, o = this.parseExprAtom(t, e);
|
|
@@ -1670,21 +1670,21 @@ re.curPosition = function() {
|
|
|
1670
1670
|
if (this.options.locations)
|
|
1671
1671
|
return new Rt(this.curLine, this.pos - this.lineStart);
|
|
1672
1672
|
};
|
|
1673
|
-
var
|
|
1673
|
+
var At = H.prototype, Cs = function(e) {
|
|
1674
1674
|
this.flags = e, this.var = [], this.lexical = [], this.functions = [];
|
|
1675
1675
|
};
|
|
1676
|
-
|
|
1676
|
+
At.enterScope = function(t) {
|
|
1677
1677
|
this.scopeStack.push(new Cs(t));
|
|
1678
1678
|
};
|
|
1679
|
-
|
|
1679
|
+
At.exitScope = function() {
|
|
1680
1680
|
this.scopeStack.pop();
|
|
1681
1681
|
};
|
|
1682
|
-
|
|
1682
|
+
At.treatFunctionsAsVarInScope = function(t) {
|
|
1683
1683
|
return t.flags & Dt || !this.inModule && t.flags & $t;
|
|
1684
1684
|
};
|
|
1685
|
-
|
|
1685
|
+
At.declareName = function(t, e, s) {
|
|
1686
1686
|
var a = !1;
|
|
1687
|
-
if (e ===
|
|
1687
|
+
if (e === St) {
|
|
1688
1688
|
var o = this.currentScope();
|
|
1689
1689
|
a = o.lexical.indexOf(t) > -1 || o.functions.indexOf(t) > -1 || o.var.indexOf(t) > -1, o.lexical.push(t), this.inModule && o.flags & $t && delete this.undefinedExports[t];
|
|
1690
1690
|
} else if (e === di) {
|
|
@@ -1705,20 +1705,20 @@ wt.declareName = function(t, e, s) {
|
|
|
1705
1705
|
}
|
|
1706
1706
|
a && this.raiseRecoverable(s, "Identifier '" + t + "' has already been declared");
|
|
1707
1707
|
};
|
|
1708
|
-
|
|
1708
|
+
At.checkLocalExport = function(t) {
|
|
1709
1709
|
this.scopeStack[0].lexical.indexOf(t.name) === -1 && this.scopeStack[0].var.indexOf(t.name) === -1 && (this.undefinedExports[t.name] = t);
|
|
1710
1710
|
};
|
|
1711
|
-
|
|
1711
|
+
At.currentScope = function() {
|
|
1712
1712
|
return this.scopeStack[this.scopeStack.length - 1];
|
|
1713
1713
|
};
|
|
1714
|
-
|
|
1714
|
+
At.currentVarScope = function() {
|
|
1715
1715
|
for (var t = this.scopeStack.length - 1; ; t--) {
|
|
1716
1716
|
var e = this.scopeStack[t];
|
|
1717
1717
|
if (e.flags & (ue | Wt | _t))
|
|
1718
1718
|
return e;
|
|
1719
1719
|
}
|
|
1720
1720
|
};
|
|
1721
|
-
|
|
1721
|
+
At.currentThisScope = function() {
|
|
1722
1722
|
for (var t = this.scopeStack.length - 1; ; t--) {
|
|
1723
1723
|
var e = this.scopeStack[t];
|
|
1724
1724
|
if (e.flags & (ue | Wt | _t) && !(e.flags & Le))
|
|
@@ -1749,13 +1749,13 @@ Xt.copyNode = function(t) {
|
|
|
1749
1749
|
e[s] = t[s];
|
|
1750
1750
|
return e;
|
|
1751
1751
|
};
|
|
1752
|
-
var
|
|
1752
|
+
var ws = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz", gi = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS", bi = gi + " Extended_Pictographic", Ti = bi, Si = Ti + " EBase EComp EMod EPres ExtPict", Pi = Si, ks = Pi, As = {
|
|
1753
1753
|
9: gi,
|
|
1754
1754
|
10: bi,
|
|
1755
1755
|
11: Ti,
|
|
1756
1756
|
12: Si,
|
|
1757
1757
|
13: Pi,
|
|
1758
|
-
14:
|
|
1758
|
+
14: ks
|
|
1759
1759
|
}, Es = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji", Is = {
|
|
1760
1760
|
9: "",
|
|
1761
1761
|
10: "",
|
|
@@ -1763,10 +1763,10 @@ var ks = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai
|
|
|
1763
1763
|
12: "",
|
|
1764
1764
|
13: "",
|
|
1765
1765
|
14: Es
|
|
1766
|
-
}, We = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", Ci = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",
|
|
1766
|
+
}, We = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", Ci = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", wi = Ci + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", ki = wi + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", Ai = ki + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", Ei = Ai + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", _s = Ei + " " + ws, Ns = {
|
|
1767
1767
|
9: Ci,
|
|
1768
|
-
10:
|
|
1769
|
-
11:
|
|
1768
|
+
10: wi,
|
|
1769
|
+
11: ki,
|
|
1770
1770
|
12: Ai,
|
|
1771
1771
|
13: Ei,
|
|
1772
1772
|
14: _s
|
|
@@ -1799,17 +1799,17 @@ ae.prototype.separatedFrom = function(e) {
|
|
|
1799
1799
|
ae.prototype.sibling = function() {
|
|
1800
1800
|
return new ae(this.parent, this.base);
|
|
1801
1801
|
};
|
|
1802
|
-
var
|
|
1802
|
+
var xt = function(e) {
|
|
1803
1803
|
this.parser = e, this.validFlags = "gim" + (e.options.ecmaVersion >= 6 ? "uy" : "") + (e.options.ecmaVersion >= 9 ? "s" : "") + (e.options.ecmaVersion >= 13 ? "d" : "") + (e.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = Ii[e.options.ecmaVersion >= 14 ? 14 : e.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = /* @__PURE__ */ Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
1804
1804
|
};
|
|
1805
|
-
|
|
1805
|
+
xt.prototype.reset = function(e, s, a) {
|
|
1806
1806
|
var o = a.indexOf("v") !== -1, l = a.indexOf("u") !== -1;
|
|
1807
1807
|
this.start = e | 0, this.source = s + "", this.flags = a, o && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = l && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = l && this.parser.options.ecmaVersion >= 9);
|
|
1808
1808
|
};
|
|
1809
|
-
|
|
1809
|
+
xt.prototype.raise = function(e) {
|
|
1810
1810
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + e);
|
|
1811
1811
|
};
|
|
1812
|
-
|
|
1812
|
+
xt.prototype.at = function(e, s) {
|
|
1813
1813
|
s === void 0 && (s = !1);
|
|
1814
1814
|
var a = this.source, o = a.length;
|
|
1815
1815
|
if (e >= o)
|
|
@@ -1820,7 +1820,7 @@ yt.prototype.at = function(e, s) {
|
|
|
1820
1820
|
var d = a.charCodeAt(e + 1);
|
|
1821
1821
|
return d >= 56320 && d <= 57343 ? (l << 10) + d - 56613888 : l;
|
|
1822
1822
|
};
|
|
1823
|
-
|
|
1823
|
+
xt.prototype.nextIndex = function(e, s) {
|
|
1824
1824
|
s === void 0 && (s = !1);
|
|
1825
1825
|
var a = this.source, o = a.length;
|
|
1826
1826
|
if (e >= o)
|
|
@@ -1828,19 +1828,19 @@ yt.prototype.nextIndex = function(e, s) {
|
|
|
1828
1828
|
var l = a.charCodeAt(e), d;
|
|
1829
1829
|
return !(s || this.switchU) || l <= 55295 || l >= 57344 || e + 1 >= o || (d = a.charCodeAt(e + 1)) < 56320 || d > 57343 ? e + 1 : e + 2;
|
|
1830
1830
|
};
|
|
1831
|
-
|
|
1831
|
+
xt.prototype.current = function(e) {
|
|
1832
1832
|
return e === void 0 && (e = !1), this.at(this.pos, e);
|
|
1833
1833
|
};
|
|
1834
|
-
|
|
1834
|
+
xt.prototype.lookahead = function(e) {
|
|
1835
1835
|
return e === void 0 && (e = !1), this.at(this.nextIndex(this.pos, e), e);
|
|
1836
1836
|
};
|
|
1837
|
-
|
|
1837
|
+
xt.prototype.advance = function(e) {
|
|
1838
1838
|
e === void 0 && (e = !1), this.pos = this.nextIndex(this.pos, e);
|
|
1839
1839
|
};
|
|
1840
|
-
|
|
1840
|
+
xt.prototype.eat = function(e, s) {
|
|
1841
1841
|
return s === void 0 && (s = !1), this.current(s) === e ? (this.advance(s), !0) : !1;
|
|
1842
1842
|
};
|
|
1843
|
-
|
|
1843
|
+
xt.prototype.eatChars = function(e, s) {
|
|
1844
1844
|
s === void 0 && (s = !1);
|
|
1845
1845
|
for (var a = this.pos, o = 0, l = e; o < l.length; o += 1) {
|
|
1846
1846
|
var d = l[o], v = this.at(a, s);
|
|
@@ -2066,7 +2066,7 @@ C.regexp_eatCapturingGroup = function(t) {
|
|
|
2066
2066
|
};
|
|
2067
2067
|
C.regexp_eatModifiers = function(t) {
|
|
2068
2068
|
for (var e = "", s = 0; (s = t.current()) !== -1 && Ms(s); )
|
|
2069
|
-
e +=
|
|
2069
|
+
e += bt(s), t.advance();
|
|
2070
2070
|
return e;
|
|
2071
2071
|
};
|
|
2072
2072
|
function Ms(t) {
|
|
@@ -2131,8 +2131,8 @@ C.regexp_eatGroupName = function(t) {
|
|
|
2131
2131
|
};
|
|
2132
2132
|
C.regexp_eatRegExpIdentifierName = function(t) {
|
|
2133
2133
|
if (t.lastStringValue = "", this.regexp_eatRegExpIdentifierStart(t)) {
|
|
2134
|
-
for (t.lastStringValue +=
|
|
2135
|
-
t.lastStringValue +=
|
|
2134
|
+
for (t.lastStringValue += bt(t.lastIntValue); this.regexp_eatRegExpIdentifierPart(t); )
|
|
2135
|
+
t.lastStringValue += bt(t.lastIntValue);
|
|
2136
2136
|
return !0;
|
|
2137
2137
|
}
|
|
2138
2138
|
return !1;
|
|
@@ -2149,7 +2149,7 @@ C.regexp_eatRegExpIdentifierPart = function(t) {
|
|
|
2149
2149
|
return t.advance(s), a === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(t, s) && (a = t.lastIntValue), Vs(a) ? (t.lastIntValue = a, !0) : (t.pos = e, !1);
|
|
2150
2150
|
};
|
|
2151
2151
|
function Vs(t) {
|
|
2152
|
-
return
|
|
2152
|
+
return gt(t, !0) || t === 36 || t === 95 || t === 8204 || t === 8205;
|
|
2153
2153
|
}
|
|
2154
2154
|
C.regexp_eatAtomEscape = function(t) {
|
|
2155
2155
|
return this.regexp_eatBackReference(t) || this.regexp_eatCharacterClassEscape(t) || this.regexp_eatCharacterEscape(t) || t.switchN && this.regexp_eatKGroupName(t) ? !0 : (t.switchU && (t.current() === 99 && t.raise("Invalid unicode escape"), t.raise("Invalid escape")), !1);
|
|
@@ -2267,11 +2267,11 @@ C.regexp_eatDecimalEscape = function(t) {
|
|
|
2267
2267
|
}
|
|
2268
2268
|
return !1;
|
|
2269
2269
|
};
|
|
2270
|
-
var Li = 0,
|
|
2270
|
+
var Li = 0, Tt = 1, ut = 2;
|
|
2271
2271
|
C.regexp_eatCharacterClassEscape = function(t) {
|
|
2272
2272
|
var e = t.current();
|
|
2273
2273
|
if (js(e))
|
|
2274
|
-
return t.lastIntValue = -1, t.advance(),
|
|
2274
|
+
return t.lastIntValue = -1, t.advance(), Tt;
|
|
2275
2275
|
var s = !1;
|
|
2276
2276
|
if (t.switchU && this.options.ecmaVersion >= 9 && ((s = e === 80) || e === 112)) {
|
|
2277
2277
|
t.lastIntValue = -1, t.advance();
|
|
@@ -2300,7 +2300,7 @@ C.regexp_eatUnicodePropertyValueExpression = function(t) {
|
|
|
2300
2300
|
var s = t.lastStringValue;
|
|
2301
2301
|
if (this.regexp_eatUnicodePropertyValue(t)) {
|
|
2302
2302
|
var a = t.lastStringValue;
|
|
2303
|
-
return this.regexp_validateUnicodePropertyNameAndValue(t, s, a),
|
|
2303
|
+
return this.regexp_validateUnicodePropertyNameAndValue(t, s, a), Tt;
|
|
2304
2304
|
}
|
|
2305
2305
|
}
|
|
2306
2306
|
if (t.pos = e, this.regexp_eatLoneUnicodePropertyNameOrValue(t)) {
|
|
@@ -2314,7 +2314,7 @@ C.regexp_validateUnicodePropertyNameAndValue = function(t, e, s) {
|
|
|
2314
2314
|
};
|
|
2315
2315
|
C.regexp_validateUnicodePropertyNameOrValue = function(t, e) {
|
|
2316
2316
|
if (t.unicodeProperties.binary.test(e))
|
|
2317
|
-
return
|
|
2317
|
+
return Tt;
|
|
2318
2318
|
if (t.switchV && t.unicodeProperties.binaryOfStrings.test(e))
|
|
2319
2319
|
return ut;
|
|
2320
2320
|
t.raise("Invalid property name");
|
|
@@ -2322,7 +2322,7 @@ C.regexp_validateUnicodePropertyNameOrValue = function(t, e) {
|
|
|
2322
2322
|
C.regexp_eatUnicodePropertyName = function(t) {
|
|
2323
2323
|
var e = 0;
|
|
2324
2324
|
for (t.lastStringValue = ""; Oi(e = t.current()); )
|
|
2325
|
-
t.lastStringValue +=
|
|
2325
|
+
t.lastStringValue += bt(e), t.advance();
|
|
2326
2326
|
return t.lastStringValue !== "";
|
|
2327
2327
|
};
|
|
2328
2328
|
function Oi(t) {
|
|
@@ -2331,7 +2331,7 @@ function Oi(t) {
|
|
|
2331
2331
|
C.regexp_eatUnicodePropertyValue = function(t) {
|
|
2332
2332
|
var e = 0;
|
|
2333
2333
|
for (t.lastStringValue = ""; Bs(e = t.current()); )
|
|
2334
|
-
t.lastStringValue +=
|
|
2334
|
+
t.lastStringValue += bt(e), t.advance();
|
|
2335
2335
|
return t.lastStringValue !== "";
|
|
2336
2336
|
};
|
|
2337
2337
|
function Bs(t) {
|
|
@@ -2357,7 +2357,7 @@ C.regexp_eatCharacterClass = function(t) {
|
|
|
2357
2357
|
return !1;
|
|
2358
2358
|
};
|
|
2359
2359
|
C.regexp_classContents = function(t) {
|
|
2360
|
-
return t.current() === 93 ?
|
|
2360
|
+
return t.current() === 93 ? Tt : t.switchV ? this.regexp_classSetExpression(t) : (this.regexp_nonEmptyClassRanges(t), Tt);
|
|
2361
2361
|
};
|
|
2362
2362
|
C.regexp_nonEmptyClassRanges = function(t) {
|
|
2363
2363
|
for (; this.regexp_eatClassAtom(t); ) {
|
|
@@ -2411,7 +2411,7 @@ C.regexp_eatClassEscape = function(t) {
|
|
|
2411
2411
|
return this.regexp_eatCharacterClassEscape(t) || this.regexp_eatCharacterEscape(t);
|
|
2412
2412
|
};
|
|
2413
2413
|
C.regexp_classSetExpression = function(t) {
|
|
2414
|
-
var e =
|
|
2414
|
+
var e = Tt, s;
|
|
2415
2415
|
if (!this.regexp_eatClassSetRange(t)) if (s = this.regexp_eatClassSetOperand(t)) {
|
|
2416
2416
|
s === ut && (e = ut);
|
|
2417
2417
|
for (var a = t.pos; t.eatChars(
|
|
@@ -2419,7 +2419,7 @@ C.regexp_classSetExpression = function(t) {
|
|
|
2419
2419
|
/* && */
|
|
2420
2420
|
); ) {
|
|
2421
2421
|
if (t.current() !== 38 && (s = this.regexp_eatClassSetOperand(t))) {
|
|
2422
|
-
s !== ut && (e =
|
|
2422
|
+
s !== ut && (e = Tt);
|
|
2423
2423
|
continue;
|
|
2424
2424
|
}
|
|
2425
2425
|
t.raise("Invalid character in character class");
|
|
@@ -2458,7 +2458,7 @@ C.regexp_eatClassSetRange = function(t) {
|
|
|
2458
2458
|
return !1;
|
|
2459
2459
|
};
|
|
2460
2460
|
C.regexp_eatClassSetOperand = function(t) {
|
|
2461
|
-
return this.regexp_eatClassSetCharacter(t) ?
|
|
2461
|
+
return this.regexp_eatClassSetCharacter(t) ? Tt : this.regexp_eatClassStringDisjunction(t) || this.regexp_eatNestedClass(t);
|
|
2462
2462
|
};
|
|
2463
2463
|
C.regexp_eatNestedClass = function(t) {
|
|
2464
2464
|
var e = t.pos;
|
|
@@ -2521,7 +2521,7 @@ C.regexp_classStringDisjunctionContents = function(t) {
|
|
|
2521
2521
|
C.regexp_classString = function(t) {
|
|
2522
2522
|
for (var e = 0; this.regexp_eatClassSetCharacter(t); )
|
|
2523
2523
|
e++;
|
|
2524
|
-
return e === 1 ?
|
|
2524
|
+
return e === 1 ? Tt : ut;
|
|
2525
2525
|
};
|
|
2526
2526
|
C.regexp_eatClassSetCharacter = function(t) {
|
|
2527
2527
|
var e = t.pos;
|
|
@@ -2788,7 +2788,7 @@ R.readToken_numberSign = function() {
|
|
|
2788
2788
|
var t = this.options.ecmaVersion, e = 35;
|
|
2789
2789
|
if (t >= 13 && (++this.pos, e = this.fullCharCodeAtPos(), ft(e, !0) || e === 92))
|
|
2790
2790
|
return this.finishToken(u.privateId, this.readWord1());
|
|
2791
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
2791
|
+
this.raise(this.pos, "Unexpected character '" + bt(e) + "'");
|
|
2792
2792
|
};
|
|
2793
2793
|
R.getTokenFromCode = function(t) {
|
|
2794
2794
|
switch (t) {
|
|
@@ -2875,7 +2875,7 @@ R.getTokenFromCode = function(t) {
|
|
|
2875
2875
|
case 35:
|
|
2876
2876
|
return this.readToken_numberSign();
|
|
2877
2877
|
}
|
|
2878
|
-
this.raise(this.pos, "Unexpected character '" +
|
|
2878
|
+
this.raise(this.pos, "Unexpected character '" + bt(t) + "'");
|
|
2879
2879
|
};
|
|
2880
2880
|
R.finishOp = function(t, e) {
|
|
2881
2881
|
var s = this.input.slice(this.pos, this.pos + e);
|
|
@@ -2902,7 +2902,7 @@ R.readRegexp = function() {
|
|
|
2902
2902
|
++this.pos;
|
|
2903
2903
|
var l = this.pos, d = this.readWord1();
|
|
2904
2904
|
this.containsEsc && this.unexpected(l);
|
|
2905
|
-
var v = this.regexpState || (this.regexpState = new
|
|
2905
|
+
var v = this.regexpState || (this.regexpState = new xt(this));
|
|
2906
2906
|
v.reset(s, o, d), this.validateRegExpFlags(v), this.validateRegExpPattern(v);
|
|
2907
2907
|
var g = null;
|
|
2908
2908
|
try {
|
|
@@ -3052,7 +3052,7 @@ R.readEscapedChar = function(t) {
|
|
|
3052
3052
|
return String.fromCharCode(this.readHexChar(2));
|
|
3053
3053
|
// 'x'
|
|
3054
3054
|
case 117:
|
|
3055
|
-
return
|
|
3055
|
+
return bt(this.readCodePoint());
|
|
3056
3056
|
// 'u'
|
|
3057
3057
|
case 116:
|
|
3058
3058
|
return " ";
|
|
@@ -3102,14 +3102,14 @@ R.readWord1 = function() {
|
|
|
3102
3102
|
this.containsEsc = !1;
|
|
3103
3103
|
for (var t = "", e = !0, s = this.pos, a = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
|
|
3104
3104
|
var o = this.fullCharCodeAtPos();
|
|
3105
|
-
if (
|
|
3105
|
+
if (gt(o, a))
|
|
3106
3106
|
this.pos += o <= 65535 ? 1 : 2;
|
|
3107
3107
|
else if (o === 92) {
|
|
3108
3108
|
this.containsEsc = !0, t += this.input.slice(s, this.pos);
|
|
3109
3109
|
var l = this.pos;
|
|
3110
3110
|
this.input.charCodeAt(++this.pos) !== 117 && this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"), ++this.pos;
|
|
3111
3111
|
var d = this.readCodePoint();
|
|
3112
|
-
(e ? ft :
|
|
3112
|
+
(e ? ft : gt)(d, a) || this.invalidStringToken(l, "Invalid Unicode escape"), t += bt(d), s = this.pos;
|
|
3113
3113
|
} else
|
|
3114
3114
|
break;
|
|
3115
3115
|
e = !1;
|
|
@@ -3134,7 +3134,7 @@ H.acorn = {
|
|
|
3134
3134
|
keywordTypes: Ot,
|
|
3135
3135
|
TokContext: X,
|
|
3136
3136
|
tokContexts: F,
|
|
3137
|
-
isIdentifierChar:
|
|
3137
|
+
isIdentifierChar: gt,
|
|
3138
3138
|
isIdentifierStart: ft,
|
|
3139
3139
|
Token: le,
|
|
3140
3140
|
isNewLine: It,
|
|
@@ -3162,7 +3162,7 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3162
3162
|
TokenType: O,
|
|
3163
3163
|
defaultOptions: ee,
|
|
3164
3164
|
getLineInfo: _e,
|
|
3165
|
-
isIdentifierChar:
|
|
3165
|
+
isIdentifierChar: gt,
|
|
3166
3166
|
isIdentifierStart: ft,
|
|
3167
3167
|
isNewLine: It,
|
|
3168
3168
|
keywordTypes: Ot,
|
|
@@ -3202,12 +3202,12 @@ function ne() {
|
|
|
3202
3202
|
}, ne.apply(this, arguments);
|
|
3203
3203
|
}
|
|
3204
3204
|
function Zt(t, e) {
|
|
3205
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
3205
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, ke(t, e);
|
|
3206
3206
|
}
|
|
3207
|
-
function
|
|
3208
|
-
return
|
|
3207
|
+
function ke(t, e) {
|
|
3208
|
+
return ke = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(s, a) {
|
|
3209
3209
|
return s.__proto__ = a, s;
|
|
3210
|
-
},
|
|
3210
|
+
}, ke(t, e);
|
|
3211
3211
|
}
|
|
3212
3212
|
function Qe(t, e) {
|
|
3213
3213
|
(e == null || e > t.length) && (e = t.length);
|
|
@@ -3514,8 +3514,8 @@ function ar(t) {
|
|
|
3514
3514
|
}
|
|
3515
3515
|
Ht(L.name) !== Ht(E.name) && this.raise(L.start, "Expected corresponding JSX closing tag for <" + Ht(E.name) + ">");
|
|
3516
3516
|
}
|
|
3517
|
-
var
|
|
3518
|
-
return b["opening" +
|
|
3517
|
+
var w = E.name ? "Element" : "Fragment";
|
|
3518
|
+
return b["opening" + w] = E, b["closing" + w] = L, b.children = T, this.type === D.relational && this.value === "<" && this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"), this.finishNode(b, "JSX" + w);
|
|
3519
3519
|
}, m.jsx_parseText = function() {
|
|
3520
3520
|
var y = this.parseLiteral(this.value);
|
|
3521
3521
|
return y.type = "JSXText", y;
|
|
@@ -4206,9 +4206,9 @@ function ar(t) {
|
|
|
4206
4206
|
}, E = function(U, B, q, G) {
|
|
4207
4207
|
(n[q] && B === G || n[G] && B === q) && r.raise(U.column, A.IncompatibleModifiers({ modifiers: [q, G] }));
|
|
4208
4208
|
}; ; ) {
|
|
4209
|
-
var L = this.startLoc,
|
|
4210
|
-
if (!
|
|
4211
|
-
ei(
|
|
4209
|
+
var L = this.startLoc, w = this.tsParseModifier(c.concat(f ?? []), m);
|
|
4210
|
+
if (!w) break;
|
|
4211
|
+
ei(w) ? n.accessibility ? this.raise(this.start, A.DuplicateAccessibilityModifier()) : (T(L, w, w, "override"), T(L, w, w, "static"), T(L, w, w, "readonly"), T(L, w, w, "accessor"), b.accessibility = w, n.accessibility = w) : sr(w) ? n[w] ? this.raise(this.start, A.DuplicateModifier({ modifier: w })) : (T(L, w, "in", "out"), b[w] = w, n[w] = !0) : ir(w) ? n[w] ? this.raise(this.start, A.DuplicateModifier({ modifier: w })) : (E(L, w, "accessor", "readonly"), E(L, w, "accessor", "static"), E(L, w, "accessor", "override"), b[w] = w, n[w] = !0) : Object.hasOwnProperty.call(n, w) ? this.raise(this.start, A.DuplicateModifier({ modifier: w })) : (T(L, w, "static", "readonly"), T(L, w, "static", "override"), T(L, w, "override", "readonly"), T(L, w, "abstract", "override"), E(L, w, "declare", "override"), E(L, w, "static", "abstract"), b[w] = w, n[w] = !0), f != null && f.includes(w) && this.raise(this.start, x);
|
|
4212
4212
|
}
|
|
4213
4213
|
return b;
|
|
4214
4214
|
}, p.tsParseInOutModifiers = function(i) {
|
|
@@ -4640,8 +4640,8 @@ function ar(t) {
|
|
|
4640
4640
|
n = !!E.static;
|
|
4641
4641
|
var L = function() {
|
|
4642
4642
|
if (!r.tsIsStartOfStaticBlocks()) {
|
|
4643
|
-
var
|
|
4644
|
-
if (
|
|
4643
|
+
var w = r.tsTryParseIndexSignature(f);
|
|
4644
|
+
if (w) return f.abstract && r.raise(f.start, A.IndexSignatureHasAbstract), f.accessibility && r.raise(f.start, A.IndexSignatureHasAccessibility({ modifier: f.accessibility })), f.declare && r.raise(f.start, A.IndexSignatureHasDeclare), f.override && r.raise(f.start, A.IndexSignatureHasOverride), w;
|
|
4645
4645
|
if (!r.inAbstractClass && f.abstract && r.raise(f.start, A.NonAbstractClassHasAbstractMethod), f.override && i && r.raise(f.start, A.OverrideNotInSubClass), f.static = n, n && (r.isClassElementNameStart() || r.type === h.star || (m = "static")), !m && c >= 8 && r.eatContextual("async") && (!r.isClassElementNameStart() && r.type !== h.star || r.canInsertSemicolon() ? m = "async" : x = !0), !m && (c >= 9 || !x) && r.eat(h.star) && (y = !0), !m && !x && !y) {
|
|
4646
4646
|
var U = r.value;
|
|
4647
4647
|
(r.eatContextual("get") || r.eatContextual("set")) && (r.isClassElementNameStart() ? b = U : m = U);
|
|
@@ -4688,7 +4688,7 @@ function ar(t) {
|
|
|
4688
4688
|
}
|
|
4689
4689
|
return c && this.checkExpressionErrors(r, !0), f > -1 && (r.parenthesizedAssign = f), m > -1 && (r.trailingComma = m), T;
|
|
4690
4690
|
}, p.parseMaybeAssign = function(i, r, n) {
|
|
4691
|
-
var c, f, m, y, x, b, T, E, L,
|
|
4691
|
+
var c, f, m, y, x, b, T, E, L, w, U, B = this;
|
|
4692
4692
|
if (this.matchJsx("jsxTagStart") || this.tsMatchLeftRelational()) {
|
|
4693
4693
|
if (E = this.cloneCurLookaheadState(), !(L = this.tryParse(function() {
|
|
4694
4694
|
return B.parseMaybeAssignOrigin(i, r, n);
|
|
@@ -4698,20 +4698,20 @@ function ar(t) {
|
|
|
4698
4698
|
}
|
|
4699
4699
|
if (!((c = L) != null && c.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(i, r, n);
|
|
4700
4700
|
E && !this.compareLookaheadState(E, this.getCurLookaheadState()) || (E = this.cloneCurLookaheadState());
|
|
4701
|
-
var it = this.tryParse(function(
|
|
4701
|
+
var it = this.tryParse(function(Ct) {
|
|
4702
4702
|
var Ft, jt;
|
|
4703
4703
|
U = B.tsParseTypeParameters();
|
|
4704
|
-
var
|
|
4705
|
-
return (
|
|
4704
|
+
var wt = B.parseMaybeAssignOrigin(i, r, n);
|
|
4705
|
+
return (wt.type !== "ArrowFunctionExpression" || (Ft = wt.extra) != null && Ft.parenthesized) && Ct(), ((jt = U) == null ? void 0 : jt.params.length) !== 0 && B.resetStartLocationFromNode(wt, U), wt.typeParameters = U, wt;
|
|
4706
4706
|
}, E);
|
|
4707
4707
|
if (!it.error && !it.aborted) return U && this.reportReservedArrowTypeParam(U), it.node;
|
|
4708
|
-
if (!L && (ti(!0), !(
|
|
4708
|
+
if (!L && (ti(!0), !(w = this.tryParse(function() {
|
|
4709
4709
|
return B.parseMaybeAssignOrigin(i, r, n);
|
|
4710
|
-
}, E)).error)) return
|
|
4710
|
+
}, E)).error)) return w.node;
|
|
4711
4711
|
if ((f = L) != null && f.node) return this.setLookaheadState(L.failState), L.node;
|
|
4712
4712
|
if (it.node) return this.setLookaheadState(it.failState), U && this.reportReservedArrowTypeParam(U), it.node;
|
|
4713
|
-
if ((m =
|
|
4714
|
-
throw (y = L) != null && y.thrown ? L.error : it.thrown ? it.error : (x =
|
|
4713
|
+
if ((m = w) != null && m.node) return this.setLookaheadState(w.failState), w.node;
|
|
4714
|
+
throw (y = L) != null && y.thrown ? L.error : it.thrown ? it.error : (x = w) != null && x.thrown ? w.error : ((b = L) == null ? void 0 : b.error) || it.error || ((T = w) == null ? void 0 : T.error);
|
|
4715
4715
|
}, p.parseAssignableListItem = function(i) {
|
|
4716
4716
|
for (var r = []; this.match(I.at); ) r.push(this.parseDecorator());
|
|
4717
4717
|
var n, c = this.start, f = this.startLoc, m = !1, y = !1;
|
|
@@ -4835,10 +4835,10 @@ function ar(t) {
|
|
|
4835
4835
|
if (this.options.ecmaVersion >= 6) {
|
|
4836
4836
|
var y = this.maybeInArrowParameters;
|
|
4837
4837
|
this.maybeInArrowParameters = !0, this.next();
|
|
4838
|
-
var x, b = this.start, T = this.startLoc, E = [], L = !0,
|
|
4838
|
+
var x, b = this.start, T = this.startLoc, E = [], L = !0, w = !1, U = new Ut(), B = this.yieldPos, q = this.awaitPos;
|
|
4839
4839
|
for (this.yieldPos = 0, this.awaitPos = 0; this.type !== h.parenR; ) {
|
|
4840
4840
|
if (L ? L = !1 : this.expect(h.comma), m && this.afterTrailingComma(h.parenR, !0)) {
|
|
4841
|
-
|
|
4841
|
+
w = !0;
|
|
4842
4842
|
break;
|
|
4843
4843
|
}
|
|
4844
4844
|
if (this.type === h.ellipsis) {
|
|
@@ -4849,11 +4849,11 @@ function ar(t) {
|
|
|
4849
4849
|
}
|
|
4850
4850
|
var G = this.lastTokEnd, it = this.lastTokEndLoc;
|
|
4851
4851
|
if (this.expect(h.parenR), this.maybeInArrowParameters = y, i && this.shouldParseArrow(E) && this.eat(h.arrow)) return this.checkPatternErrors(U, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = B, this.awaitPos = q, this.parseParenArrowList(c, f, E, r);
|
|
4852
|
-
E.length && !
|
|
4852
|
+
E.length && !w || this.unexpected(this.lastTokStart), x && this.unexpected(x), this.checkExpressionErrors(U, !0), this.yieldPos = B || this.yieldPos, this.awaitPos = q || this.awaitPos, E.length > 1 ? ((n = this.startNodeAt(b, T)).expressions = E, this.finishNodeAt(n, "SequenceExpression", G, it)) : n = E[0];
|
|
4853
4853
|
} else n = this.parseParenExpression();
|
|
4854
4854
|
if (this.options.preserveParens) {
|
|
4855
|
-
var
|
|
4856
|
-
return
|
|
4855
|
+
var Ct = this.startNodeAt(c, f);
|
|
4856
|
+
return Ct.expression = n, this.finishNode(Ct, "ParenthesizedExpression");
|
|
4857
4857
|
}
|
|
4858
4858
|
return n;
|
|
4859
4859
|
}, p.parseTaggedTemplateExpression = function(i, r, n, c) {
|
|
@@ -4891,7 +4891,7 @@ function ar(t) {
|
|
|
4891
4891
|
i.optional = !0, b = E = !0, this.next();
|
|
4892
4892
|
}
|
|
4893
4893
|
if (this.tsMatchLeftRelational() || this.match(h.bitShift)) {
|
|
4894
|
-
var L,
|
|
4894
|
+
var L, w = this.tsTryParseAndCatch(function() {
|
|
4895
4895
|
if (!c && x.atPossibleAsyncArrow(i)) {
|
|
4896
4896
|
var Be = x.tsTryParseGenericAsyncArrowFunction(r, n, y);
|
|
4897
4897
|
if (Be) return i = Be;
|
|
@@ -4913,7 +4913,7 @@ function ar(t) {
|
|
|
4913
4913
|
return ye.expression = i, ye.typeParameters = Yt, x.finishNode(ye, "TSInstantiationExpression");
|
|
4914
4914
|
}
|
|
4915
4915
|
});
|
|
4916
|
-
if (L && this.unexpected(L),
|
|
4916
|
+
if (L && this.unexpected(L), w) return w.type === "TSInstantiationExpression" && (this.match(h.dot) || this.match(h.questionDot) && this.lookaheadCharCode() !== 40) && this.raise(this.start, A.InvalidPropertyAccessAfterInstantiationExpression), i = w;
|
|
4917
4917
|
}
|
|
4918
4918
|
var U = this.options.ecmaVersion >= 11, B = U && this.eat(h.questionDot);
|
|
4919
4919
|
c && B && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
|
|
@@ -4924,12 +4924,12 @@ function ar(t) {
|
|
|
4924
4924
|
} else if (!c && this.eat(h.parenL)) {
|
|
4925
4925
|
var it = this.maybeInArrowParameters;
|
|
4926
4926
|
this.maybeInArrowParameters = !0;
|
|
4927
|
-
var
|
|
4927
|
+
var Ct = new Ut(), Ft = this.yieldPos, jt = this.awaitPos, wt = this.awaitIdentPos;
|
|
4928
4928
|
this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0;
|
|
4929
|
-
var je = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1,
|
|
4930
|
-
if (f && !B && this.shouldParseAsyncArrow()) this.checkPatternErrors(
|
|
4929
|
+
var je = this.parseExprList(h.parenR, this.options.ecmaVersion >= 8, !1, Ct);
|
|
4930
|
+
if (f && !B && this.shouldParseAsyncArrow()) this.checkPatternErrors(Ct, !1), this.checkYieldAwaitInDefaultParams(), this.awaitIdentPos > 0 && this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"), this.yieldPos = Ft, this.awaitPos = jt, this.awaitIdentPos = wt, i = this.parseSubscriptAsyncArrow(r, n, je, y);
|
|
4931
4931
|
else {
|
|
4932
|
-
this.checkExpressionErrors(
|
|
4932
|
+
this.checkExpressionErrors(Ct, !0), this.yieldPos = Ft || this.yieldPos, this.awaitPos = jt || this.awaitPos, this.awaitIdentPos = wt || this.awaitIdentPos;
|
|
4933
4933
|
var Jt = this.startNodeAt(r, n);
|
|
4934
4934
|
Jt.callee = i, Jt.arguments = je, U && (Jt.optional = B), i = this.finishNode(Jt, "CallExpression");
|
|
4935
4935
|
}
|
|
@@ -5098,7 +5098,8 @@ const nr = [
|
|
|
5098
5098
|
{ idPrefix: "datapos-presenter", typeId: "presenter", isPublish: !0, uploadGroupName: "presenters" },
|
|
5099
5099
|
{ idPrefix: "datapos-resources", typeId: "resources", isPublish: !1, uploadGroupName: void 0 },
|
|
5100
5100
|
{ idPrefix: "datapos-shared", typeId: "shared", isPublish: !0, uploadGroupName: void 0 },
|
|
5101
|
-
{ idPrefix: "datapos-tool", typeId: "tool", isPublish: !0, uploadGroupName: "tools" }
|
|
5101
|
+
{ idPrefix: "datapos-tool", typeId: "tool", isPublish: !0, uploadGroupName: "tools" },
|
|
5102
|
+
{ idPrefix: "eslint-config-datapos", typeId: "eslint", isPublish: !0, uploadGroupName: void 0 }
|
|
5102
5103
|
], or = ss(rs);
|
|
5103
5104
|
async function hr(t) {
|
|
5104
5105
|
let e;
|
|
@@ -5149,12 +5150,12 @@ function Ui(t) {
|
|
|
5149
5150
|
}
|
|
5150
5151
|
async function Ve() {
|
|
5151
5152
|
}
|
|
5152
|
-
function
|
|
5153
|
+
function vt(t) {
|
|
5153
5154
|
const e = "\x1B[36m", s = "\x1B[0m", a = "─".repeat(Math.max(t.length + 60, 60));
|
|
5154
5155
|
console.info(`
|
|
5155
5156
|
${e}${a}`), console.info(`▶️ ${t}`), console.info(`${a}${s}`);
|
|
5156
5157
|
}
|
|
5157
|
-
function
|
|
5158
|
+
function Pt(t) {
|
|
5158
5159
|
console.info(`
|
|
5159
5160
|
✅ ${t}
|
|
5160
5161
|
`);
|
|
@@ -5241,14 +5242,14 @@ async function si(t, e) {
|
|
|
5241
5242
|
}
|
|
5242
5243
|
async function Mr() {
|
|
5243
5244
|
try {
|
|
5244
|
-
|
|
5245
|
+
vt("Build Project"), await dt("1️⃣ Bundle project", "vite", ["build"]), Pt("Project built.");
|
|
5245
5246
|
} catch (t) {
|
|
5246
5247
|
console.error("❌ Error building project.", t), process.exit(1);
|
|
5247
5248
|
}
|
|
5248
5249
|
}
|
|
5249
5250
|
async function Dr() {
|
|
5250
5251
|
try {
|
|
5251
|
-
|
|
5252
|
+
vt("Release Project"), await Ve();
|
|
5252
5253
|
const t = await Q("package.json");
|
|
5253
5254
|
let e = await Q("config.json");
|
|
5254
5255
|
await Hi("1️⃣", t);
|
|
@@ -5287,23 +5288,23 @@ async function Dr() {
|
|
|
5287
5288
|
}
|
|
5288
5289
|
} else
|
|
5289
5290
|
K(`8️⃣ Publishing NOT required for package with type identifier of '${s.typeId}'.`);
|
|
5290
|
-
|
|
5291
|
+
Pt(`Project version '${t.version}' released.`);
|
|
5291
5292
|
} catch (t) {
|
|
5292
5293
|
console.error("❌ Error releasing project.", t), process.exit(1);
|
|
5293
5294
|
}
|
|
5294
5295
|
}
|
|
5295
5296
|
async function Vr() {
|
|
5296
5297
|
try {
|
|
5297
|
-
|
|
5298
|
+
vt("Synchronise Project with GitHub");
|
|
5298
5299
|
const t = await Q("package.json");
|
|
5299
|
-
K("Bump project version"), await Hi("1️⃣", t), await ct("2️⃣ Stage changes", "git", ["add", "."]), await ct("3️⃣ Commit changes", "git", ["commit", "-m", `"v${t.version}"`]), await ct("4️⃣ Push changes", "git", ["push", "origin", "main:main"]),
|
|
5300
|
+
K("Bump project version"), await Hi("1️⃣", t), await ct("2️⃣ Stage changes", "git", ["add", "."]), await ct("3️⃣ Commit changes", "git", ["commit", "-m", `"v${t.version}"`]), await ct("4️⃣ Push changes", "git", ["push", "origin", "main:main"]), Pt(`Project version '${t.version}' synchronised with GitHub.`);
|
|
5300
5301
|
} catch (t) {
|
|
5301
5302
|
console.error("❌ Error synchronising project with GitHub.", t), process.exit(1);
|
|
5302
5303
|
}
|
|
5303
5304
|
}
|
|
5304
5305
|
function Fr() {
|
|
5305
5306
|
try {
|
|
5306
|
-
|
|
5307
|
+
vt("Test Project"), console.error(`
|
|
5307
5308
|
❌ No tests implemented.
|
|
5308
5309
|
`);
|
|
5309
5310
|
} catch (t) {
|
|
@@ -5366,7 +5367,7 @@ const xr = {
|
|
|
5366
5367
|
}, vr = "<!-- OWASP_BADGES_START -->", gr = "<!-- OWASP_BADGES_END -->";
|
|
5367
5368
|
async function jr() {
|
|
5368
5369
|
try {
|
|
5369
|
-
|
|
5370
|
+
vt("Audit Dependencies"), await Ve();
|
|
5370
5371
|
const t = await Q("package.json");
|
|
5371
5372
|
await dt("1️⃣", "owasp-dependency-check", [
|
|
5372
5373
|
"--out",
|
|
@@ -5377,7 +5378,7 @@ async function jr() {
|
|
|
5377
5378
|
"--nodePackageSkipDevDependencies",
|
|
5378
5379
|
"--nvdApiKey",
|
|
5379
5380
|
process.env.OWASP_NVD_API_KEY ?? ""
|
|
5380
|
-
]), await br("2️⃣"), await dt("3️⃣ Check using 'npm audit'", "npm", ["audit"]),
|
|
5381
|
+
]), await br("2️⃣"), await dt("3️⃣ Check using 'npm audit'", "npm", ["audit"]), Pt("Dependencies audited.");
|
|
5381
5382
|
} catch (t) {
|
|
5382
5383
|
console.error("❌ Error auditing dependencies.", t), process.exit(1);
|
|
5383
5384
|
}
|
|
@@ -5409,7 +5410,7 @@ async function Tr(t) {
|
|
|
5409
5410
|
}
|
|
5410
5411
|
async function Br() {
|
|
5411
5412
|
try {
|
|
5412
|
-
|
|
5413
|
+
vt("Check Dependencies"), await dt("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await dt("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", ["-i"]), Pt("Dependencies checked.");
|
|
5413
5414
|
} catch (t) {
|
|
5414
5415
|
console.error("❌ Error checking dependencies.", t), process.exit(1);
|
|
5415
5416
|
}
|
|
@@ -5417,7 +5418,7 @@ async function Br() {
|
|
|
5417
5418
|
const Sr = "<!-- DEPENDENCY_LICENSES_START -->", Pr = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
5418
5419
|
async function Ur(t = [], e = !0) {
|
|
5419
5420
|
try {
|
|
5420
|
-
|
|
5421
|
+
vt("Document Dependencies"), await Ve();
|
|
5421
5422
|
const s = t.flatMap((o) => ["--allowed", `'${o}'`]), a = ri(new ns(import.meta.resolve("@datapos/datapos-development/license-report-config")));
|
|
5422
5423
|
await ct(
|
|
5423
5424
|
"1️⃣ Generate 'licenses.json' file",
|
|
@@ -5437,7 +5438,7 @@ async function Ur(t = [], e = !0) {
|
|
|
5437
5438
|
"--githubToken.tokenEnvVar",
|
|
5438
5439
|
"GITHUB_TOKEN",
|
|
5439
5440
|
"--download"
|
|
5440
|
-
]), await Cr("6️⃣", e),
|
|
5441
|
+
]), await Cr("6️⃣", e), Pt("Dependencies documented.");
|
|
5441
5442
|
} catch (s) {
|
|
5442
5443
|
console.error("❌ Error documenting dependencies.", s), process.exit(1);
|
|
5443
5444
|
}
|
|
@@ -5467,7 +5468,7 @@ async function Cr(t, e) {
|
|
|
5467
5468
|
|:-|:-|:-:|:-:|:-|-:|:-|
|
|
5468
5469
|
`;
|
|
5469
5470
|
for (const h of l) {
|
|
5470
|
-
const P = h.installedVersion === h.remoteVersion ? h.installedVersion : `${h.installedVersion} ⚠️`, N = h.latestRemoteModified ?
|
|
5471
|
+
const P = h.installedVersion === h.remoteVersion ? h.installedVersion : `${h.installedVersion} ⚠️`, N = h.latestRemoteModified ? wr(h.latestRemoteModified.split("T")[0]) : "n/a", j = h.dependencyCount != null && h.dependencyCount >= 0 ? h.dependencyCount : "n/a";
|
|
5471
5472
|
let nt;
|
|
5472
5473
|
h.licenseFileLink == null || h.licenseFileLink == "" ? nt = "⚠️ No license file" : nt = `[${h.licenseFileLink.slice(Math.max(0, h.licenseFileLink.lastIndexOf("/") + 1))}](${h.licenseFileLink})`, d += `|${h.name}|${h.licenseType}|${P}|${h.remoteVersion}|${N}|${j}|${nt}|
|
|
5473
5474
|
`;
|
|
@@ -5475,7 +5476,7 @@ async function Cr(t, e) {
|
|
|
5475
5476
|
const v = await Et("./README.md"), g = qi(v, d, Sr, Pr);
|
|
5476
5477
|
await Gt("README.md", g), console.info("OWASP audit badge(s) inserted into 'README.md'"), await Gt("README.md", g);
|
|
5477
5478
|
}
|
|
5478
|
-
function
|
|
5479
|
+
function wr(t) {
|
|
5479
5480
|
if (t == null || t === "") return "n/a";
|
|
5480
5481
|
const e = t.split("T")[0];
|
|
5481
5482
|
if (e == null || e === "") return "n/a";
|
|
@@ -5485,26 +5486,26 @@ function kr(t) {
|
|
|
5485
5486
|
}
|
|
5486
5487
|
async function qr() {
|
|
5487
5488
|
try {
|
|
5488
|
-
|
|
5489
|
+
vt("Format Code");
|
|
5489
5490
|
const s = ["--write", "*.json", "*.md", "*.ts", ...["app", "src"].filter((a) => Qi(a)).map((a) => `${a}/**`)];
|
|
5490
|
-
await dt("1️⃣ Format", "prettier", s),
|
|
5491
|
+
await dt("1️⃣ Format", "prettier", s), Pt("Code formatted.");
|
|
5491
5492
|
} catch (t) {
|
|
5492
5493
|
console.error("❌ Error formatting code.", t), process.exit(1);
|
|
5493
5494
|
}
|
|
5494
5495
|
}
|
|
5495
5496
|
async function Hr() {
|
|
5496
5497
|
try {
|
|
5497
|
-
|
|
5498
|
+
vt("Lint Code"), await dt("1️⃣ Lint", "eslint", ["."]), Pt("Code linted.");
|
|
5498
5499
|
} catch (t) {
|
|
5499
5500
|
console.error("❌ Error linting code.", t), process.exit(1);
|
|
5500
5501
|
}
|
|
5501
5502
|
}
|
|
5502
|
-
const
|
|
5503
|
+
const kr = ["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣"];
|
|
5503
5504
|
async function $r(t = []) {
|
|
5504
5505
|
try {
|
|
5505
|
-
|
|
5506
|
+
vt("Update '@datapos/datapos' Dependencies");
|
|
5506
5507
|
for (const [e, s] of t.entries()) {
|
|
5507
|
-
const a =
|
|
5508
|
+
const a = kr.at(e) ?? "🔢";
|
|
5508
5509
|
if (s === "eslint")
|
|
5509
5510
|
await dt(`${a} Update '${s}'`, "npm", ["install", "@datapos/eslint-config-datapos@latest"]);
|
|
5510
5511
|
else if (await dt(`${a} Update '${s}'`, "npm", ["install", `@datapos/datapos-${s}@latest`]), s === "development") {
|
|
@@ -5512,16 +5513,16 @@ async function $r(t = []) {
|
|
|
5512
5513
|
await Ar(l);
|
|
5513
5514
|
}
|
|
5514
5515
|
}
|
|
5515
|
-
|
|
5516
|
+
Pt("'@datapos/datapos' dependencies updated.");
|
|
5516
5517
|
} catch (e) {
|
|
5517
5518
|
console.error("❌ Error updating '@datapos/datapos' dependencies.", e), process.exit(1);
|
|
5518
5519
|
}
|
|
5519
5520
|
}
|
|
5520
5521
|
async function Ar(t) {
|
|
5521
5522
|
const e = te.dirname(ri(import.meta.url));
|
|
5522
|
-
await
|
|
5523
|
+
await mt(e, "../", ".editorconfig"), await mt(e, "../", ".gitattributes"), await (t.isPublish ? mt(e, "../", ".gitignore_published", ".gitignore2") : mt(e, "../", ".gitignore_unpublished", ".gitignore2")), await mt(e, "../", ".markdownlint.json"), await mt(e, "../", "eslint.config.ts", "eslint.config2.ts"), await mt(e, "../", "LICENSE"), await mt(e, "../", "tsconfig.json", "tsconfig2.json"), await mt(e, "../", "vite.config.ts", "vite.config2.ts"), await mt(e, "../", "vitest.config.ts", "vitest.config2.ts");
|
|
5523
5524
|
}
|
|
5524
|
-
async function
|
|
5525
|
+
async function mt(t, e, s, a) {
|
|
5525
5526
|
const o = te.resolve(t, `${e}${s}`), l = await Et(o), d = te.resolve(process.cwd(), a ?? s);
|
|
5526
5527
|
let v;
|
|
5527
5528
|
try {
|